// Have include guard.
#ifndef NULLVALUEOUTPUT_H
#define NULLVALUEOUTPUT_H

// Include files.
#include "ValueOutput.hpp"

/**
 *  The NullValueOutput is a ValueOutput that does nothing when the value is set (think of it as a black hole).
 *  
 *  @tparam Value The type of value that can be output.
 */
template<typename Value>
class NullValueOutput :
	public ValueOutput<Value>
{
	public:
		/**
		 *  Get the instance of NullValueOutput.
		 *  
		 *  @return A reference to the NullValueOutput.
		 */
		static NullValueOutput<Value> &GetInstance()
		{
			return s_instance;
		}
		
		/**
		 *  Set the value to output.
		 *  
		 *  Value is sent into nothingness.
		 *  
		 *  @param value The value to output.
		 */
		virtual void SetValue(Value value)
		{
		}
	private:
		static NullValueOutput<Value> s_instance;
		
		/**
		 *  Constructor for NullValueOutput.
		 */
		NullValueOutput()
		{
		}
		
		/**
		 *  Copy constructor for NullValueOutput.
		 *  
		 *  @param other The NullValueOutput to copy from.
		 */
		NullValueOutput(const NullValueOutput &other)
		{
		}
};

template<typename Value>
NullValueOutput<Value> NullValueOutput<Value>::s_instance = NullValueOutput();

#endif // #ifndef NULLVALUEOUTPUT_H
